package com.leco.demo.spring.beans;

/**
 * @author greg
 * @version 2022/10/20
 **/
public abstract class Animal {
    private String name;
    public Animal() {
        System.out.println("Animal类的构造方法被执行了");
        this.name = "默认昵称";
    }
    public Animal(String name) {
        System.out.println("Animal类的有参构造方法被执行了");
    }

    public abstract void cry();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
